import { service } from '../service/request'

//获取线体名称
export async function GetLineName() {
  return await service({
    url: "DMS/KSKH/GetLineName",
    method: 'post'
  });
}
//保存线体名称
export async function SaveLineName(data: any) {
  return await service({
    url: "DMS/KSKH/SaveLineName",
    method: 'post',
    data
  });
}

//获取Model下拉框
export async function GetModelName() {
  return await service({
    url: "DMS/KSKH/GetModelName",
    method: 'post',
  });
}

//保存Model
export async function SaveModelName() {
  return await service({
    url: "DMS/KSKH/SaveModelName",
    method: 'post'
  });
}

//登录
export async function Login(data: any) {
  return await service({
    url: "DMS/KSKH/Login",
    method: 'post',
    data,
  });
}

//获取线体信息
export async function GetLineInfo(data: any) {
  return await service({
    url: "DMS/KSKH/GetLineInfo",
    method: 'post',
    data,
  });
}

//分段设备连接状态
export async function GetDeviceConnInfo(data: any) {
  return await service({
    url: "DMS/KSKH/GetDeviceConnInfo",
    method: 'post',
    data,
  });
}

//设备控制-保存
export async function SaveLineInfo(data: any) {
  return await service({
    url: "DMS/KSKH/SaveLineInfo",
    method: 'post',
    data,
  });
}

// 启动线体
export async function RunDevice(data: any) {
  return await service({
    url: "DMS/KSKH/RunDevice",
    method: 'post',
    data,
  });
}

// 停止线体
export async function StopDevice(data: any) {
  return await service({
    url: "DMS/KSKH/StopDevice",
    method: 'post',
    data,
  });
}

// 获取线体总信息
export async function GetLineState(data: any) {
  return await service({
    url: "DMS/KSKH/GetLineState",
    method: 'post',
    data,
  });
}

// 获取设备状态List
export async function GetDeviceStatus(data: any) {
  return await service({
    url: "DMS/KSKH/GetDeviceStatus",
    method: 'post',
    data,
  });
}

// 获取设备信息
export async function GetDeviceInfo(data: any) {
  return await service({
    url: "DMS/KSKH/GetDeviceInfo",
    method: 'post',
    data,
  });
}

// 获取日志信息
export async function GetRealLog(data: any) {
  return await service({
    url: "DMS/KSKH/GetHisLog",
    method: 'post',
    data,
  });
}

export async function LineControl(data: any) {
  return await service({
    url: "DMS/KSKH/LineControl",
    method: 'post',
    data,
  });
}